<script language="javascript"><!--
	function fillin_details (name) {
		var f= document.forms[0];
		var words= name.split(' ');
		var fname= words[0];
		var lname= words.slice(1).join(' ');
		if (f.PLAYER_FIRSTNAME.value == '') {
			f.PLAYER_FIRSTNAME.value= fname;
		}
		if (f.PLAYER_LASTNAME.value == '') {
			f.PLAYER_LASTNAME.value= lname;
		}
		if (f.PLAYER_FULLNAME.value == '') {
			f.PLAYER_FULLNAME.value= name;
		}
	}
//-->
</script>

<h2 class="contentTitle">Edit Player: <a href="javascript:getObject('<TMPL_VAR NAME=PK_OBJECT_ID>','PLAYER');"><TMPL_VAR NAME=PLAYER_NAME></a></h2>

<div class="contentBody">
<fieldset>
<div class="instructions"><h4>Instructions for Adding and Editing Player Profiles</h4>
<p>WiganWarriorsFans.com maintains a database of player profiles.  Each profile is written by users of the site.  To add a player profile to the WiganWarriorsFans.com database you should fill in the form on this page.  Your profile will then appear on the site.</p>
<p>Please ensure that the profile you are entering does not already exist on the site.  <b>You must check the <a href="<TMPL_VAR NAME=CGI_BASE_URL>s=Squad">squad pages</a> and <a href="<TMPL_VAR NAME=CGI_BASE_URL>s=Search">search for the player</a> before you post a new player profile using this page</b>.  Duplicate profiles will be removed and any user repeatedly duplicating information will have their posting permissions removed.  You can edit profiles submitted by other users to add any extra information you may have.</p>
<p>Please ensure that you include only facts, not opinions or rumours and use good English when writing the profile.  Do not use a conversational tone, write your piece as if you were a newpaper or web journalist.  Any user submissions that do not meet these guidelines will be removed by the site's moderators.</p>
<p>If you are adding facts that you have found on another internet site, you must credit the original site with a link.  Failure to do this will lead to your profile being removed from this site.  This restriction is for copyright reasons.</p>
<p>Please ensure that you highlight any other news stories or matches that are related to the profile you are editing.  This allows the site to display relevant content next to the story you have entered.</p>
<p>The main body of the profile must be written in HTML.  For instructions on how to use HTML to format your profile you can use the examples at <a href="http://www.w3schools.com/html/html_examples.asp">http://www.w3schools.com/html/html_examples.asp</a>.</p></div>

<input type=hidden name=FK_PLAYER_ID value="<TMPL_VAR NAME=PK_OBJECT_ID>">
<table class="contentTable">
<tr>
<td class="label">Name:</td>
<td><input type=text name=PLAYER_NAME value="<TMPL_VAR NAME=PLAYER_NAME>" size=80 onblur="fillin_details(this.value);"><br>
<small>Used in match summaries</small>
</td>
</tr>
<tr>
<td class="label">Full Name:</td>
<td><input type=text name=PLAYER_FULLNAME value="<TMPL_VAR NAME=PLAYER_FULLNAME>" size=80><br>
<small>Players full name inc. middle names etc.</small>
</td>
</tr>
<tr>
<td class="label">Surname:</td>
<td><input type=text name=PLAYER_LASTNAME value="<TMPL_VAR NAME=PLAYER_LASTNAME>" size=40><br/>
<small>The players surname.</small>
</td>
</tr>
<tr>
<td class="label">First Name:</td>
<td><input type=text name=PLAYER_FIRSTNAME value="<TMPL_VAR NAME=PLAYER_FIRSTNAME>" size=40><br/>
<small>The players first name.</small>
</td>
</tr>
<tr>
<td class="label">Nick Name(s):</td>
<td><input type=text name=PLAYER_NICKNAME value="<TMPL_VAR NAME=PLAYER_NICKNAME>" size=80><br/>
<small>Any nicknames that the player is known by amongst the fans and other players.</small>
</td>
</tr>
<tr>
<td class="label">Height:</td>
<td><input type=text name=PLAYER_HEIGHT value="<TMPL_VAR NAME=PLAYER_HEIGHT>" size=10><br/>
<small>The players height</small>
</td>
</tr>
<tr>
<td class="label">Weight:</td>
<td><input type=text name=PLAYER_WEIGHT value="<TMPL_VAR NAME=PLAYER_WEIGHT>" size=10><br/>
<small>The players current weight</small>
</td>
</tr>
<tr>
<td class="label">Date of Birth:</td>
<td><input type=text name=PLAYER_DATEOFBIRTH value="<TMPL_VAR NAME=PLAYER_DATEOFBIRTH>" size=10><br>
<small>Date of birth.  Format: yyyy-mm-dd</small>
</td>
</tr>
<tr>
<td class="label">Place of Birth:</td>
<td><input type=text name=PLAYER_PLACEOFBIRTH value="<TMPL_VAR NAME=PLAYER_PLACEOFBIRTH>" size=80><br/>
<small>Place of birth.</small>
</td>
</tr>
<tr>
<td class="label">Profile:</td>
<td><textarea rows="20" cols="80" name="PLAYER_PROFILE"><TMPL_VAR NAME=PLAYER_PROFILE></textarea><br/>
<small>Text of the profile.  This field accepts HTML content. For instructions on how to use HTML to format your profile you can use the examples at <a href="http://www.w3schools.com/html/html_examples.asp">http://www.w3schools.com/html/html_examples.asp</a>. </td>
</tr>
<tr>
<td class="label">Current Club:</td>
<td><select name="FK_CLUB_ID">
<option value="">Please select</option>
<TMPL_VAR NAME=CLUB_CLUB_OPTIONS>
</select> <input type=button class="button" onClick="addObject('CLUB','<TMPL_VAR NAME=PK_OBJECT_ID>')" value="Add Club">
<br/>
<small>Select the players current club from the list</small>
</td>
</tr>
<tr>
<td class="label">Positions:</td>
<td><select name="PLAYER_POSITIONS" multiple size="8"><TMPL_VAR NAME=PLAYER_POSITION_OPTIONS></select><br>
<small>Select more than one position by holding the Control key and left clicking entries</small>
</td>
</tr>
<tr>
<td colspan=2>
<div class="submit">
		<input type=button class="button" onClick="updateObject('PLAYER','<TMPL_VAR NAME=PK_OBJECT_ID>','<TMPL_VAR NAME=FK_PARENT_ID>');" value="Update &raquo;">
</div>
</td>
</tr>
		<tr>
		<th colspan=2>Related Content</td>
		</tr>

<tr>
<td class="label">Related News:</td>
<td><select name="RELATED_NEWS" multiple size=7>
<TMPL_VAR NAME=RELATED_OPTIONS_NEWS>
</select>
<TMPL_VAR NAME=_OBJECT_UPDATE_ERROR_RELATED_NEWS_></td>
</tr>
<tr>
<td class="label">Related Matches:</td>
<td><select name="RELATED_MATCHSTATS" multiple size=5>
<TMPL_VAR NAME=RELATED_OPTIONS_MATCHSTATS>
</select>
<TMPL_VAR NAME=_OBJECT_UPDATE_ERROR_RELATED_MATCHSTATS_><br>
<small>Matches related to this players profile.  Select multiple matches by holding the Control key and clicking on the entry. Deselect using the same procedure.</small></td>
</tr>
</table>
<div class="submit">
		<input type=button class="button" onClick="updateObject('PLAYER','<TMPL_VAR NAME=PK_OBJECT_ID>','<TMPL_VAR NAME=FK_PARENT_ID>');" value="Update &raquo;">
</div>

</fieldset>
</div>

<TMPL_VAR NAME=OBJECT_WIKI_HTML>

<TMPL_VAR NAME=OBJECT_MODERATOR_HTML>

<TMPL_VAR NAME=OBJECT_ADMIN_HTML>

<TMPL_VAR NAME=OBJECT_SUPERADMIN_HTML>

<TMPL_VAR NAME=OBJECTS> 